package rpc

// IRPC contract
type IRPC interface {
	Name() string
	Call(callType int, method string, args interface{}, reply interface{}) error
	Register(method string, serviceFunc ServiceFunc) error
	Close() error
}

// Response for rpc
type Response struct {
	ReturnCode   int         `json:"returnCode"`
	ErrorMessage string      `json:"errorMessage"`
	Result       interface{} `json:"result,omitempty"`
}
